from django.db import models

# Create your models here.
class UserInfo(models.Model):
  name = models.CharField(max_length=32)
  password = models.CharField(max_length=64)
  age = models.IntegerField()

# 基于以上代码，ORM会自动为我们执行如下数据库创建语句
# create app_01_userinfo (
#   id bigint not null auto_increment,
#   name varchar(32) not null,
#   password varchar(64) not null,
#   age int(11) not null,
#   primary key (id)
# )

class Department(models.Model):
  title = models.CharField(max_length=32)

class Role(models.Model):
  caption = models.CharField(max_length=32)